.class public final Lorg/jboss/netty/buffer/ChannelBuffers;
.super Ljava/lang/Object;
.source "ChannelBuffers.java"


# static fields
.field public static final BIG_ENDIAN:Ljava/nio/ByteOrder;

.field public static final EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

.field private static final HEXDUMP_TABLE:[C

.field public static final LITTLE_ENDIAN:Ljava/nio/ByteOrder;


# direct methods
.method static constructor <clinit>()V
    .locals 5

    .prologue
    .line 93
    sget-object v2, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    sput-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    .line 98
    sget-object v2, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    sput-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    .line 103
    new-instance v2, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;

    const/4 v3, 0x0

    invoke-direct {v2, v3}, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;-><init>(I)V

    sput-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 105
    const/16 v2, 0x400

    new-array v2, v2, [C

    sput-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->HEXDUMP_TABLE:[C

    .line 108
    const-string v2, "0123456789abcdef"

    invoke-virtual {v2}, Ljava/lang/String;->toCharArray()[C

    move-result-object v0

    .line 109
    .local v0, DIGITS:[C
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    const/16 v2, 0x100

    if-ge v1, v2, :cond_0

    .line 110
    sget-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->HEXDUMP_TABLE:[C

    shl-int/lit8 v3, v1, 0x1

    add-int/lit8 v3, v3, 0x0

    ushr-int/lit8 v4, v1, 0x4

    and-int/lit8 v4, v4, 0xf

    aget-char v4, v0, v4

    aput-char v4, v2, v3

    .line 111
    sget-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->HEXDUMP_TABLE:[C

    shl-int/lit8 v3, v1, 0x1

    add-int/lit8 v3, v3, 0x1

    ushr-int/lit8 v4, v1, 0x0

    and-int/lit8 v4, v4, 0xf

    aget-char v4, v0, v4

    aput-char v4, v2, v3

    .line 109
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 113
    :cond_0
    return-void
.end method

.method private constructor <init>()V
    .locals 0

    .prologue
    .line 1160
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1162
    return-void
.end method

.method public static buffer(I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "capacity"

    .prologue
    .line 121
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->buffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static buffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "capacity"

    .prologue
    .line 130
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne p0, v0, :cond_1

    .line 131
    if-nez p1, :cond_0

    .line 132
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 139
    :goto_0
    return-object v0

    .line 134
    :cond_0
    new-instance v0, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;

    invoke-direct {v0, p1}, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;-><init>(I)V

    goto :goto_0

    .line 135
    :cond_1
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    if-ne p0, v0, :cond_3

    .line 136
    if-nez p1, :cond_2

    .line 137
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 139
    :cond_2
    new-instance v0, Lorg/jboss/netty/buffer/LittleEndianHeapChannelBuffer;

    invoke-direct {v0, p1}, Lorg/jboss/netty/buffer/LittleEndianHeapChannelBuffer;-><init>(I)V

    goto :goto_0

    .line 141
    :cond_3
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "endianness"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public static compare(Lorg/jboss/netty/buffer/ChannelBuffer;Lorg/jboss/netty/buffer/ChannelBuffer;)I
    .locals 17
    .parameter "bufferA"
    .parameter "bufferB"

    .prologue
    .line 957
    invoke-interface/range {p0 .. p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v2

    .line 958
    .local v2, aLen:I
    invoke-interface/range {p1 .. p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v4

    .line 959
    .local v4, bLen:I
    invoke-static {v2, v4}, Ljava/lang/Math;->min(II)I

    move-result v7

    .line 960
    .local v7, minLength:I
    ushr-int/lit8 v8, v7, 0x2

    .line 961
    .local v8, uintCount:I
    and-int/lit8 v5, v7, 0x3

    .line 963
    .local v5, byteCount:I
    invoke-interface/range {p0 .. p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v1

    .line 964
    .local v1, aIndex:I
    invoke-interface/range {p1 .. p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v3

    .line 966
    .local v3, bIndex:I
    invoke-interface/range {p0 .. p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v13

    invoke-interface/range {p1 .. p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v14

    if-ne v13, v14, :cond_2

    .line 967
    move v6, v8

    .local v6, i:I
    :goto_0
    if-lez v6, :cond_5

    .line 968
    move-object/from16 v0, p0

    invoke-interface {v0, v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedInt(I)J

    move-result-wide v9

    .line 969
    .local v9, va:J
    move-object/from16 v0, p1

    invoke-interface {v0, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedInt(I)J

    move-result-wide v11

    .line 970
    .local v11, vb:J
    cmp-long v13, v9, v11

    if-lez v13, :cond_0

    .line 971
    const/4 v13, 0x1

    .line 1004
    .end local v9           #va:J
    .end local v11           #vb:J
    :goto_1
    return v13

    .line 972
    .restart local v9       #va:J
    .restart local v11       #vb:J
    :cond_0
    cmp-long v13, v9, v11

    if-gez v13, :cond_1

    .line 973
    const/4 v13, -0x1

    goto :goto_1

    .line 975
    :cond_1
    add-int/lit8 v1, v1, 0x4

    .line 976
    add-int/lit8 v3, v3, 0x4

    .line 967
    add-int/lit8 v6, v6, -0x1

    goto :goto_0

    .line 979
    .end local v6           #i:I
    .end local v9           #va:J
    .end local v11           #vb:J
    :cond_2
    move v6, v8

    .restart local v6       #i:I
    :goto_2
    if-lez v6, :cond_5

    .line 980
    move-object/from16 v0, p0

    invoke-interface {v0, v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedInt(I)J

    move-result-wide v9

    .line 981
    .restart local v9       #va:J
    move-object/from16 v0, p1

    invoke-interface {v0, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getInt(I)I

    move-result v13

    invoke-static {v13}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapInt(I)I

    move-result v13

    int-to-long v13, v13

    const-wide v15, 0xffffffffL

    and-long v11, v13, v15

    .line 982
    .restart local v11       #vb:J
    cmp-long v13, v9, v11

    if-lez v13, :cond_3

    .line 983
    const/4 v13, 0x1

    goto :goto_1

    .line 984
    :cond_3
    cmp-long v13, v9, v11

    if-gez v13, :cond_4

    .line 985
    const/4 v13, -0x1

    goto :goto_1

    .line 987
    :cond_4
    add-int/lit8 v1, v1, 0x4

    .line 988
    add-int/lit8 v3, v3, 0x4

    .line 979
    add-int/lit8 v6, v6, -0x1

    goto :goto_2

    .line 992
    .end local v9           #va:J
    .end local v11           #vb:J
    :cond_5
    move v6, v5

    :goto_3
    if-lez v6, :cond_8

    .line 993
    move-object/from16 v0, p0

    invoke-interface {v0, v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedByte(I)S

    move-result v9

    .line 994
    .local v9, va:S
    move-object/from16 v0, p1

    invoke-interface {v0, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedByte(I)S

    move-result v11

    .line 995
    .local v11, vb:S
    if-le v9, v11, :cond_6

    .line 996
    const/4 v13, 0x1

    goto :goto_1

    .line 997
    :cond_6
    if-ge v9, v11, :cond_7

    .line 998
    const/4 v13, -0x1

    goto :goto_1

    .line 1000
    :cond_7
    add-int/lit8 v1, v1, 0x1

    .line 1001
    add-int/lit8 v3, v3, 0x1

    .line 992
    add-int/lit8 v6, v6, -0x1

    goto :goto_3

    .line 1004
    .end local v9           #va:S
    .end local v11           #vb:S
    :cond_8
    sub-int v13, v2, v4

    goto :goto_1
.end method

.method private static compositeBuffer(Ljava/nio/ByteOrder;Ljava/util/List;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "endianness"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/nio/ByteOrder;",
            "Ljava/util/List",
            "<",
            "Lorg/jboss/netty/buffer/ChannelBuffer;",
            ">;)",
            "Lorg/jboss/netty/buffer/ChannelBuffer;"
        }
    .end annotation

    .prologue
    .line 374
    .local p1, components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 380
    new-instance v0, Lorg/jboss/netty/buffer/CompositeChannelBuffer;

    invoke-direct {v0, p0, p1}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;-><init>(Ljava/nio/ByteOrder;Ljava/util/List;)V

    :goto_0
    return-object v0

    .line 376
    :pswitch_0
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 378
    :pswitch_1
    const/4 v0, 0x0

    invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 374
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static copiedBuffer(Ljava/lang/CharSequence;IILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "string"
    .parameter "offset"
    .parameter "length"
    .parameter "charset"

    .prologue
    .line 691
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/lang/CharSequence;IILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static copiedBuffer(Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "string"
    .parameter "charset"

    .prologue
    .line 680
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static copiedBuffer(Ljava/lang/String;Ljava/lang/String;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "string"
    .parameter "charsetName"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 814
    invoke-static {p1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-static {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static copiedBuffer(Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 4
    .parameter "buffer"

    .prologue
    .line 543
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v1

    .line 544
    .local v1, length:I
    if-nez v1, :cond_0

    .line 545
    sget-object v3, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 554
    :goto_0
    return-object v3

    .line 547
    :cond_0
    new-array v0, v1, [B

    .line 548
    .local v0, copy:[B
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I

    move-result v2

    .line 550
    .local v2, position:I
    :try_start_0
    invoke-virtual {p0, v0}, Ljava/nio/ByteBuffer;->get([B)Ljava/nio/ByteBuffer;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 552
    invoke-virtual {p0, v2}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 554
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v3

    invoke-static {v3, v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v3

    goto :goto_0

    .line 552
    :catchall_0
    move-exception v3

    invoke-virtual {p0, v2}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    throw v3
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;Ljava/lang/CharSequence;IILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 4
    .parameter "endianness"
    .parameter "string"
    .parameter "offset"
    .parameter "length"
    .parameter "charset"

    .prologue
    .line 722
    if-nez p1, :cond_0

    .line 723
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "string"

    invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 725
    :cond_0
    if-nez p3, :cond_1

    .line 726
    sget-object v1, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 745
    :goto_0
    return-object v1

    .line 729
    :cond_1
    instance-of v1, p1, Ljava/nio/CharBuffer;

    if-eqz v1, :cond_3

    move-object v0, p1

    .line 730
    check-cast v0, Ljava/nio/CharBuffer;

    .line 731
    .local v0, buf:Ljava/nio/CharBuffer;
    invoke-virtual {v0}, Ljava/nio/CharBuffer;->hasArray()Z

    move-result v1

    if-eqz v1, :cond_2

    .line 732
    invoke-virtual {v0}, Ljava/nio/CharBuffer;->array()[C

    move-result-object v1

    invoke-virtual {v0}, Ljava/nio/CharBuffer;->arrayOffset()I

    move-result v2

    invoke-virtual {v0}, Ljava/nio/CharBuffer;->position()I

    move-result v3

    add-int/2addr v2, v3

    add-int/2addr v2, p2

    invoke-static {p0, v1, v2, p3, p4}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[CIILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    goto :goto_0

    .line 739
    :cond_2
    invoke-virtual {v0}, Ljava/nio/CharBuffer;->slice()Ljava/nio/CharBuffer;

    move-result-object v0

    .line 740
    invoke-virtual {v0, p3}, Ljava/nio/CharBuffer;->limit(I)Ljava/nio/Buffer;

    .line 741
    invoke-virtual {v0, p2}, Ljava/nio/CharBuffer;->position(I)Ljava/nio/Buffer;

    .line 742
    invoke-static {p0, v0, p4}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    goto :goto_0

    .line 745
    .end local v0           #buf:Ljava/nio/CharBuffer;
    :cond_3
    add-int v1, p2, p3

    invoke-static {p1, p2, v1}, Ljava/nio/CharBuffer;->wrap(Ljava/lang/CharSequence;II)Ljava/nio/CharBuffer;

    move-result-object v1

    invoke-static {p0, v1, p4}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    goto :goto_0
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "string"
    .parameter "charset"

    .prologue
    .line 702
    if-nez p1, :cond_0

    .line 703
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "string"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 706
    :cond_0
    instance-of v0, p1, Ljava/nio/CharBuffer;

    if-eqz v0, :cond_1

    .line 707
    check-cast p1, Ljava/nio/CharBuffer;

    .end local p1
    invoke-static {p0, p1, p2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 710
    :goto_0
    return-object v0

    .restart local p1
    :cond_1
    invoke-static {p1}, Ljava/nio/CharBuffer;->wrap(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;

    move-result-object v0

    invoke-static {p0, v0, p2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    goto :goto_0
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;Ljava/lang/String;Ljava/lang/String;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "endianness"
    .parameter "string"
    .parameter "charsetName"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 822
    invoke-static {p2}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-static {p0, p1, v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/lang/CharSequence;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method private static copiedBuffer(Ljava/nio/ByteOrder;Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 4
    .parameter "endianness"
    .parameter "buffer"
    .parameter "charset"

    .prologue
    .line 802
    move-object v2, p1

    .line 803
    .local v2, src:Ljava/nio/CharBuffer;
    invoke-static {v2, p2}, Lorg/jboss/netty/buffer/ChannelBuffers;->encodeString(Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Ljava/nio/ByteBuffer;

    move-result-object v0

    .line 804
    .local v0, dst:Ljava/nio/ByteBuffer;
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v3

    invoke-static {p0, v3}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    .line 805
    .local v1, result:Lorg/jboss/netty/buffer/ChannelBuffer;
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v3

    invoke-interface {v1, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->writerIndex(I)V

    .line 806
    return-object v1
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "array"

    .prologue
    .line 493
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne p0, v0, :cond_1

    .line 494
    array-length v0, p1

    if-nez v0, :cond_0

    .line 495
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 502
    :goto_0
    return-object v0

    .line 497
    :cond_0
    new-instance v1, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;

    invoke-virtual {p1}, [B->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    invoke-direct {v1, v0}, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;-><init>([B)V

    move-object v0, v1

    goto :goto_0

    .line 498
    :cond_1
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    if-ne p0, v0, :cond_3

    .line 499
    array-length v0, p1

    if-nez v0, :cond_2

    .line 500
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 502
    :cond_2
    new-instance v1, Lorg/jboss/netty/buffer/LittleEndianHeapChannelBuffer;

    invoke-virtual {p1}, [B->clone()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    invoke-direct {v1, v0}, Lorg/jboss/netty/buffer/LittleEndianHeapChannelBuffer;-><init>([B)V

    move-object v0, v1

    goto :goto_0

    .line 504
    :cond_3
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "endianness"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;[BII)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "endianness"
    .parameter "array"
    .parameter "offset"
    .parameter "length"

    .prologue
    .line 525
    if-nez p0, :cond_0

    .line 526
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "endianness"

    invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 528
    :cond_0
    if-nez p3, :cond_1

    .line 529
    sget-object v1, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 533
    :goto_0
    return-object v1

    .line 531
    :cond_1
    new-array v0, p3, [B

    .line 532
    .local v0, copy:[B
    const/4 v1, 0x0

    invoke-static {p1, p2, v0, v1, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 533
    invoke-static {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    goto :goto_0
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;[CIILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "array"
    .parameter "offset"
    .parameter "length"
    .parameter "charset"

    .prologue
    .line 791
    if-nez p1, :cond_0

    .line 792
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "array"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 794
    :cond_0
    if-nez p3, :cond_1

    .line 795
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 797
    :goto_0
    return-object v0

    :cond_1
    invoke-static {p1, p2, p3}, Ljava/nio/CharBuffer;->wrap([CII)Ljava/nio/CharBuffer;

    move-result-object v0

    invoke-static {p0, v0, p4}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    goto :goto_0
.end method

.method public static copiedBuffer(Ljava/nio/ByteOrder;[CLjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "array"
    .parameter "charset"

    .prologue
    .line 779
    const/4 v0, 0x0

    array-length v1, p1

    invoke-static {p0, p1, v0, v1, p2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[CIILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static varargs copiedBuffer(Ljava/nio/ByteOrder;[[B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 11
    .parameter "endianness"
    .parameter "arrays"

    .prologue
    const/4 v10, 0x0

    .line 588
    array-length v8, p1

    packed-switch v8, :pswitch_data_0

    .line 600
    const/4 v6, 0x0

    .line 601
    .local v6, length:I
    move-object v1, p1

    .local v1, arr$:[[B
    array-length v5, v1

    .local v5, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_0
    if-ge v3, v5, :cond_2

    aget-object v0, v1, v3

    .line 602
    .local v0, a:[B
    const v8, 0x7fffffff

    sub-int/2addr v8, v6

    array-length v9, v0

    if-ge v8, v9, :cond_1

    .line 603
    new-instance v8, Ljava/lang/IllegalArgumentException;

    const-string v9, "The total length of the specified arrays is too big."

    invoke-direct {v8, v9}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v8

    .line 590
    .end local v0           #a:[B
    .end local v1           #arr$:[[B
    .end local v3           #i$:I
    .end local v5           #len$:I
    .end local v6           #length:I
    :pswitch_0
    sget-object v8, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 620
    :goto_1
    return-object v8

    .line 592
    :pswitch_1
    aget-object v8, p1, v10

    array-length v8, v8

    if-nez v8, :cond_0

    .line 593
    sget-object v8, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_1

    .line 595
    :cond_0
    aget-object v8, p1, v10

    invoke-static {p0, v8}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v8

    goto :goto_1

    .line 606
    .restart local v0       #a:[B
    .restart local v1       #arr$:[[B
    .restart local v3       #i$:I
    .restart local v5       #len$:I
    .restart local v6       #length:I
    :cond_1
    array-length v8, v0

    add-int/2addr v6, v8

    .line 601
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 609
    .end local v0           #a:[B
    :cond_2
    if-nez v6, :cond_3

    .line 610
    sget-object v8, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_1

    .line 613
    :cond_3
    new-array v7, v6, [B

    .line 614
    .local v7, mergedArray:[B
    const/4 v2, 0x0

    .local v2, i:I
    const/4 v4, 0x0

    .local v4, j:I
    :goto_2
    array-length v8, p1

    if-ge v2, v8, :cond_4

    .line 615
    aget-object v0, p1, v2

    .line 616
    .restart local v0       #a:[B
    array-length v8, v0

    invoke-static {v0, v10, v7, v4, v8}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 617
    array-length v8, v0

    add-int/2addr v4, v8

    .line 614
    add-int/lit8 v2, v2, 0x1

    goto :goto_2

    .line 620
    .end local v0           #a:[B
    :cond_4
    invoke-static {p0, v7}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v8

    goto :goto_1

    .line 588
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static copiedBuffer(Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "buffer"

    .prologue
    .line 564
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readable()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 565
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->copy()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 567
    :goto_0
    return-object v0

    :cond_0
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0
.end method

.method public static copiedBuffer([B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "array"

    .prologue
    .line 483
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static copiedBuffer([BII)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "array"
    .parameter "offset"
    .parameter "length"

    .prologue
    .line 515
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0, p1, p2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[BII)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static copiedBuffer([CIILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "array"
    .parameter "offset"
    .parameter "length"
    .parameter "charset"

    .prologue
    .line 768
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[CIILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static copiedBuffer([CLjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "array"
    .parameter "charset"

    .prologue
    .line 757
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    const/4 v1, 0x0

    array-length v2, p0

    invoke-static {v0, p0, v1, v2, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[CIILjava/nio/charset/Charset;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static varargs copiedBuffer([Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "buffers"

    .prologue
    .line 659
    array-length v2, p0

    packed-switch v2, :pswitch_data_0

    .line 666
    array-length v2, p0

    new-array v0, v2, [Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 667
    .local v0, copiedBuffers:[Lorg/jboss/netty/buffer/ChannelBuffer;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    array-length v2, p0

    if-ge v1, v2, :cond_0

    .line 668
    aget-object v2, p0, v1

    invoke-static {v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v2

    aput-object v2, v0, v1

    .line 667
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 661
    .end local v0           #copiedBuffers:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .end local v1           #i:I
    :pswitch_0
    sget-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 670
    :goto_1
    return-object v2

    .line 663
    :pswitch_1
    const/4 v2, 0x0

    aget-object v2, p0, v2

    invoke-static {v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v2

    goto :goto_1

    .line 670
    .restart local v0       #copiedBuffers:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .restart local v1       #i:I
    :cond_0
    invoke-static {v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer([Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v2

    goto :goto_1

    .line 659
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static varargs copiedBuffer([Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "buffers"

    .prologue
    .line 634
    array-length v2, p0

    packed-switch v2, :pswitch_data_0

    .line 641
    array-length v2, p0

    new-array v0, v2, [Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 642
    .local v0, copiedBuffers:[Lorg/jboss/netty/buffer/ChannelBuffer;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    array-length v2, p0

    if-ge v1, v2, :cond_0

    .line 643
    aget-object v2, p0, v1

    invoke-static {v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v2

    aput-object v2, v0, v1

    .line 642
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 636
    .end local v0           #copiedBuffers:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .end local v1           #i:I
    :pswitch_0
    sget-object v2, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 645
    :goto_1
    return-object v2

    .line 638
    :pswitch_1
    const/4 v2, 0x0

    aget-object v2, p0, v2

    invoke-static {v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v2

    goto :goto_1

    .line 645
    .restart local v0       #copiedBuffers:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .restart local v1       #i:I
    :cond_0
    invoke-static {v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer([Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v2

    goto :goto_1

    .line 634
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static varargs copiedBuffer([[B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "arrays"

    .prologue
    .line 578
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->copiedBuffer(Ljava/nio/ByteOrder;[[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method static decodeString(Ljava/nio/ByteBuffer;Ljava/nio/charset/Charset;)Ljava/lang/String;
    .locals 8
    .parameter "src"
    .parameter "charset"

    .prologue
    .line 1142
    invoke-static {p1}, Lorg/jboss/netty/util/CharsetUtil;->getDecoder(Ljava/nio/charset/Charset;)Ljava/nio/charset/CharsetDecoder;

    move-result-object v1

    .line 1143
    .local v1, decoder:Ljava/nio/charset/CharsetDecoder;
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v4

    int-to-double v4, v4

    invoke-virtual {v1}, Ljava/nio/charset/CharsetDecoder;->maxCharsPerByte()F

    move-result v6

    float-to-double v6, v6

    mul-double/2addr v4, v6

    double-to-int v4, v4

    invoke-static {v4}, Ljava/nio/CharBuffer;->allocate(I)Ljava/nio/CharBuffer;

    move-result-object v2

    .line 1146
    .local v2, dst:Ljava/nio/CharBuffer;
    const/4 v4, 0x1

    :try_start_0
    invoke-virtual {v1, p0, v2, v4}, Ljava/nio/charset/CharsetDecoder;->decode(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;Z)Ljava/nio/charset/CoderResult;

    move-result-object v0

    .line 1147
    .local v0, cr:Ljava/nio/charset/CoderResult;
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->isUnderflow()Z

    move-result v4

    if-nez v4, :cond_0

    .line 1148
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->throwException()V

    .line 1150
    :cond_0
    invoke-virtual {v1, v2}, Ljava/nio/charset/CharsetDecoder;->flush(Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;

    move-result-object v0

    .line 1151
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->isUnderflow()Z

    move-result v4

    if-nez v4, :cond_1

    .line 1152
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->throwException()V
    :try_end_0
    .catch Ljava/nio/charset/CharacterCodingException; {:try_start_0 .. :try_end_0} :catch_0

    .line 1157
    :cond_1
    invoke-virtual {v2}, Ljava/nio/CharBuffer;->flip()Ljava/nio/Buffer;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    return-object v4

    .line 1154
    .end local v0           #cr:Ljava/nio/charset/CoderResult;
    :catch_0
    move-exception v3

    .line 1155
    .local v3, x:Ljava/nio/charset/CharacterCodingException;
    new-instance v4, Ljava/lang/IllegalStateException;

    invoke-direct {v4, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V

    throw v4
.end method

.method public static directBuffer(I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "capacity"

    .prologue
    .line 151
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->directBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static directBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "endianness"
    .parameter "capacity"

    .prologue
    .line 160
    if-nez p0, :cond_0

    .line 161
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "endianness"

    invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 163
    :cond_0
    if-nez p1, :cond_1

    .line 164
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 170
    :goto_0
    return-object v0

    .line 167
    :cond_1
    new-instance v0, Lorg/jboss/netty/buffer/ByteBufferBackedChannelBuffer;

    invoke-static {p1}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    move-result-object v1

    invoke-direct {v0, v1}, Lorg/jboss/netty/buffer/ByteBufferBackedChannelBuffer;-><init>(Ljava/nio/ByteBuffer;)V

    .line 169
    .local v0, buffer:Lorg/jboss/netty/buffer/ChannelBuffer;
    invoke-interface {v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->clear()V

    goto :goto_0
.end method

.method public static dynamicBuffer()Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2

    .prologue
    .line 179
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    const/16 v1, 0x100

    invoke-static {v0, v1}, Lorg/jboss/netty/buffer/ChannelBuffers;->dynamicBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static dynamicBuffer(I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "estimatedLength"

    .prologue
    .line 197
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->dynamicBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static dynamicBuffer(ILorg/jboss/netty/buffer/ChannelBufferFactory;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "estimatedLength"
    .parameter "factory"

    .prologue
    .line 217
    if-nez p1, :cond_0

    .line 218
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "factory"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 221
    :cond_0
    new-instance v0, Lorg/jboss/netty/buffer/DynamicChannelBuffer;

    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBufferFactory;->getDefaultOrder()Ljava/nio/ByteOrder;

    move-result-object v1

    invoke-direct {v0, v1, p0, p1}, Lorg/jboss/netty/buffer/DynamicChannelBuffer;-><init>(Ljava/nio/ByteOrder;ILorg/jboss/netty/buffer/ChannelBufferFactory;)V

    return-object v0
.end method

.method public static dynamicBuffer(Ljava/nio/ByteOrder;I)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "endianness"
    .parameter "estimatedLength"

    .prologue
    .line 207
    new-instance v0, Lorg/jboss/netty/buffer/DynamicChannelBuffer;

    invoke-direct {v0, p0, p1}, Lorg/jboss/netty/buffer/DynamicChannelBuffer;-><init>(Ljava/nio/ByteOrder;I)V

    return-object v0
.end method

.method public static dynamicBuffer(Ljava/nio/ByteOrder;ILorg/jboss/netty/buffer/ChannelBufferFactory;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "endianness"
    .parameter "estimatedLength"
    .parameter "factory"

    .prologue
    .line 231
    new-instance v0, Lorg/jboss/netty/buffer/DynamicChannelBuffer;

    invoke-direct {v0, p0, p1, p2}, Lorg/jboss/netty/buffer/DynamicChannelBuffer;-><init>(Ljava/nio/ByteOrder;ILorg/jboss/netty/buffer/ChannelBufferFactory;)V

    return-object v0
.end method

.method public static dynamicBuffer(Lorg/jboss/netty/buffer/ChannelBufferFactory;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 3
    .parameter "factory"

    .prologue
    .line 183
    if-nez p0, :cond_0

    .line 184
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "factory"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 187
    :cond_0
    new-instance v0, Lorg/jboss/netty/buffer/DynamicChannelBuffer;

    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBufferFactory;->getDefaultOrder()Ljava/nio/ByteOrder;

    move-result-object v1

    const/16 v2, 0x100

    invoke-direct {v0, v1, v2, p0}, Lorg/jboss/netty/buffer/DynamicChannelBuffer;-><init>(Ljava/nio/ByteOrder;ILorg/jboss/netty/buffer/ChannelBufferFactory;)V

    return-object v0
.end method

.method static encodeString(Ljava/nio/CharBuffer;Ljava/nio/charset/Charset;)Ljava/nio/ByteBuffer;
    .locals 8
    .parameter "src"
    .parameter "charset"

    .prologue
    .line 1122
    invoke-static {p1}, Lorg/jboss/netty/util/CharsetUtil;->getEncoder(Ljava/nio/charset/Charset;)Ljava/nio/charset/CharsetEncoder;

    move-result-object v2

    .line 1123
    .local v2, encoder:Ljava/nio/charset/CharsetEncoder;
    invoke-virtual {p0}, Ljava/nio/CharBuffer;->remaining()I

    move-result v4

    int-to-double v4, v4

    invoke-virtual {v2}, Ljava/nio/charset/CharsetEncoder;->maxBytesPerChar()F

    move-result v6

    float-to-double v6, v6

    mul-double/2addr v4, v6

    double-to-int v4, v4

    invoke-static {v4}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;

    move-result-object v1

    .line 1126
    .local v1, dst:Ljava/nio/ByteBuffer;
    const/4 v4, 0x1

    :try_start_0
    invoke-virtual {v2, p0, v1, v4}, Ljava/nio/charset/CharsetEncoder;->encode(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;

    move-result-object v0

    .line 1127
    .local v0, cr:Ljava/nio/charset/CoderResult;
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->isUnderflow()Z

    move-result v4

    if-nez v4, :cond_0

    .line 1128
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->throwException()V

    .line 1130
    :cond_0
    invoke-virtual {v2, v1}, Ljava/nio/charset/CharsetEncoder;->flush(Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;

    move-result-object v0

    .line 1131
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->isUnderflow()Z

    move-result v4

    if-nez v4, :cond_1

    .line 1132
    invoke-virtual {v0}, Ljava/nio/charset/CoderResult;->throwException()V
    :try_end_0
    .catch Ljava/nio/charset/CharacterCodingException; {:try_start_0 .. :try_end_0} :catch_0

    .line 1137
    :cond_1
    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;

    .line 1138
    return-object v1

    .line 1134
    .end local v0           #cr:Ljava/nio/charset/CoderResult;
    :catch_0
    move-exception v3

    .line 1135
    .local v3, x:Ljava/nio/charset/CharacterCodingException;
    new-instance v4, Ljava/lang/IllegalStateException;

    invoke-direct {v4, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/Throwable;)V

    throw v4
.end method

.method public static equals(Lorg/jboss/netty/buffer/ChannelBuffer;Lorg/jboss/netty/buffer/ChannelBuffer;)Z
    .locals 11
    .parameter "bufferA"
    .parameter "bufferB"

    .prologue
    const/4 v6, 0x0

    .line 912
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v1

    .line 913
    .local v1, aLen:I
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v7

    if-eq v1, v7, :cond_1

    .line 949
    :cond_0
    :goto_0
    return v6

    .line 917
    :cond_1
    ushr-int/lit8 v5, v1, 0x3

    .line 918
    .local v5, longCount:I
    and-int/lit8 v3, v1, 0x7

    .line 920
    .local v3, byteCount:I
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v0

    .line 921
    .local v0, aIndex:I
    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v2

    .line 923
    .local v2, bIndex:I
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v7

    invoke-interface {p1}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v8

    if-ne v7, v8, :cond_2

    .line 924
    move v4, v5

    .local v4, i:I
    :goto_1
    if-lez v4, :cond_3

    .line 925
    invoke-interface {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->getLong(I)J

    move-result-wide v7

    invoke-interface {p1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getLong(I)J

    move-result-wide v9

    cmp-long v7, v7, v9

    if-nez v7, :cond_0

    .line 928
    add-int/lit8 v0, v0, 0x8

    .line 929
    add-int/lit8 v2, v2, 0x8

    .line 924
    add-int/lit8 v4, v4, -0x1

    goto :goto_1

    .line 932
    .end local v4           #i:I
    :cond_2
    move v4, v5

    .restart local v4       #i:I
    :goto_2
    if-lez v4, :cond_3

    .line 933
    invoke-interface {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->getLong(I)J

    move-result-wide v7

    invoke-interface {p1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getLong(I)J

    move-result-wide v9

    invoke-static {v9, v10}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapLong(J)J

    move-result-wide v9

    cmp-long v7, v7, v9

    if-nez v7, :cond_0

    .line 936
    add-int/lit8 v0, v0, 0x8

    .line 937
    add-int/lit8 v2, v2, 0x8

    .line 932
    add-int/lit8 v4, v4, -0x1

    goto :goto_2

    .line 941
    :cond_3
    move v4, v3

    :goto_3
    if-lez v4, :cond_4

    .line 942
    invoke-interface {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->getByte(I)B

    move-result v7

    invoke-interface {p1, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getByte(I)B

    move-result v8

    if-ne v7, v8, :cond_0

    .line 945
    add-int/lit8 v0, v0, 0x1

    .line 946
    add-int/lit8 v2, v2, 0x1

    .line 941
    add-int/lit8 v4, v4, -0x1

    goto :goto_3

    .line 949
    :cond_4
    const/4 v6, 0x1

    goto :goto_0
.end method

.method private static firstIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IIB)I
    .locals 3
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "value"

    .prologue
    const/4 v1, -0x1

    .line 1062
    const/4 v2, 0x0

    invoke-static {p1, v2}, Ljava/lang/Math;->max(II)I

    move-result p1

    .line 1063
    if-ge p1, p2, :cond_0

    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v2

    if-nez v2, :cond_2

    :cond_0
    move v0, v1

    .line 1073
    :cond_1
    :goto_0
    return v0

    .line 1067
    :cond_2
    move v0, p1

    .local v0, i:I
    :goto_1
    if-ge v0, p2, :cond_3

    .line 1068
    invoke-interface {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->getByte(I)B

    move-result v2

    if-eq v2, p3, :cond_1

    .line 1067
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_3
    move v0, v1

    .line 1073
    goto :goto_0
.end method

.method private static firstIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 3
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "indexFinder"

    .prologue
    const/4 v1, -0x1

    .line 1092
    const/4 v2, 0x0

    invoke-static {p1, v2}, Ljava/lang/Math;->max(II)I

    move-result p1

    .line 1093
    if-ge p1, p2, :cond_0

    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v2

    if-nez v2, :cond_2

    :cond_0
    move v0, v1

    .line 1103
    :cond_1
    :goto_0
    return v0

    .line 1097
    :cond_2
    move v0, p1

    .local v0, i:I
    :goto_1
    if-ge v0, p2, :cond_3

    .line 1098
    invoke-interface {p3, p0, v0}, Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;->find(Lorg/jboss/netty/buffer/ChannelBuffer;I)Z

    move-result v2

    if-nez v2, :cond_1

    .line 1097
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_3
    move v0, v1

    .line 1103
    goto :goto_0
.end method

.method public static hashCode(Lorg/jboss/netty/buffer/ChannelBuffer;)I
    .locals 9
    .parameter "buffer"

    .prologue
    .line 877
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v0

    .line 878
    .local v0, aLen:I
    ushr-int/lit8 v6, v0, 0x2

    .line 879
    .local v6, intCount:I
    and-int/lit8 v3, v0, 0x3

    .line 881
    .local v3, byteCount:I
    const/4 v4, 0x1

    .line 882
    .local v4, hashCode:I
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v1

    .line 883
    .local v1, arrayIndex:I
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v7

    sget-object v8, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne v7, v8, :cond_0

    .line 884
    move v5, v6

    .local v5, i:I
    :goto_0
    if-lez v5, :cond_1

    .line 885
    mul-int/lit8 v7, v4, 0x1f

    invoke-interface {p0, v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->getInt(I)I

    move-result v8

    add-int v4, v7, v8

    .line 886
    add-int/lit8 v1, v1, 0x4

    .line 884
    add-int/lit8 v5, v5, -0x1

    goto :goto_0

    .line 889
    .end local v5           #i:I
    :cond_0
    move v5, v6

    .restart local v5       #i:I
    :goto_1
    if-lez v5, :cond_1

    .line 890
    mul-int/lit8 v7, v4, 0x1f

    invoke-interface {p0, v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->getInt(I)I

    move-result v8

    invoke-static {v8}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapInt(I)I

    move-result v8

    add-int v4, v7, v8

    .line 891
    add-int/lit8 v1, v1, 0x4

    .line 889
    add-int/lit8 v5, v5, -0x1

    goto :goto_1

    .line 895
    :cond_1
    move v5, v3

    move v2, v1

    .end local v1           #arrayIndex:I
    .local v2, arrayIndex:I
    :goto_2
    if-lez v5, :cond_2

    .line 896
    mul-int/lit8 v7, v4, 0x1f

    add-int/lit8 v1, v2, 0x1

    .end local v2           #arrayIndex:I
    .restart local v1       #arrayIndex:I
    invoke-interface {p0, v2}, Lorg/jboss/netty/buffer/ChannelBuffer;->getByte(I)B

    move-result v8

    add-int v4, v7, v8

    .line 895
    add-int/lit8 v5, v5, -0x1

    move v2, v1

    .end local v1           #arrayIndex:I
    .restart local v2       #arrayIndex:I
    goto :goto_2

    .line 899
    :cond_2
    if-nez v4, :cond_3

    .line 900
    const/4 v4, 0x1

    .line 903
    :cond_3
    return v4
.end method

.method public static hexDump(Lorg/jboss/netty/buffer/ChannelBuffer;)Ljava/lang/String;
    .locals 2
    .parameter "buffer"

    .prologue
    .line 843
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v0

    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v1

    invoke-static {p0, v0, v1}, Lorg/jboss/netty/buffer/ChannelBuffers;->hexDump(Lorg/jboss/netty/buffer/ChannelBuffer;II)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static hexDump(Lorg/jboss/netty/buffer/ChannelBuffer;II)Ljava/lang/String;
    .locals 7
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "length"

    .prologue
    .line 851
    if-gez p2, :cond_0

    .line 852
    new-instance v4, Ljava/lang/IllegalArgumentException;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "length: "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v4

    .line 854
    :cond_0
    if-nez p2, :cond_1

    .line 855
    const-string v4, ""

    .line 869
    :goto_0
    return-object v4

    .line 858
    :cond_1
    add-int v2, p1, p2

    .line 859
    .local v2, endIndex:I
    shl-int/lit8 v4, p2, 0x1

    new-array v0, v4, [C

    .line 861
    .local v0, buf:[C
    move v3, p1

    .line 862
    .local v3, srcIdx:I
    const/4 v1, 0x0

    .line 863
    .local v1, dstIdx:I
    :goto_1
    if-ge v3, v2, :cond_2

    .line 864
    sget-object v4, Lorg/jboss/netty/buffer/ChannelBuffers;->HEXDUMP_TABLE:[C

    invoke-interface {p0, v3}, Lorg/jboss/netty/buffer/ChannelBuffer;->getUnsignedByte(I)S

    move-result v5

    shl-int/lit8 v5, v5, 0x1

    const/4 v6, 0x2

    invoke-static {v4, v5, v0, v1, v6}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 863
    add-int/lit8 v3, v3, 0x1

    add-int/lit8 v1, v1, 0x2

    goto :goto_1

    .line 869
    :cond_2
    new-instance v4, Ljava/lang/String;

    invoke-direct {v4, v0}, Ljava/lang/String;-><init>([C)V

    goto :goto_0
.end method

.method public static indexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IIB)I
    .locals 1
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "value"

    .prologue
    .line 1012
    if-gt p1, p2, :cond_0

    .line 1013
    invoke-static {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->firstIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IIB)I

    move-result v0

    .line 1015
    :goto_0
    return v0

    :cond_0
    invoke-static {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->lastIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IIB)I

    move-result v0

    goto :goto_0
.end method

.method public static indexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 1
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "indexFinder"

    .prologue
    .line 1024
    if-gt p1, p2, :cond_0

    .line 1025
    invoke-static {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->firstIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    .line 1027
    :goto_0
    return v0

    :cond_0
    invoke-static {p0, p1, p2, p3}, Lorg/jboss/netty/buffer/ChannelBuffers;->lastIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I

    move-result v0

    goto :goto_0
.end method

.method private static lastIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IIB)I
    .locals 3
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "value"

    .prologue
    const/4 v1, -0x1

    .line 1077
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v2

    invoke-static {p1, v2}, Ljava/lang/Math;->min(II)I

    move-result p1

    .line 1078
    if-ltz p1, :cond_0

    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v2

    if-nez v2, :cond_2

    :cond_0
    move v0, v1

    .line 1088
    :cond_1
    :goto_0
    return v0

    .line 1082
    :cond_2
    add-int/lit8 v0, p1, -0x1

    .local v0, i:I
    :goto_1
    if-lt v0, p2, :cond_3

    .line 1083
    invoke-interface {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffer;->getByte(I)B

    move-result v2

    if-eq v2, p3, :cond_1

    .line 1082
    add-int/lit8 v0, v0, -0x1

    goto :goto_1

    :cond_3
    move v0, v1

    .line 1088
    goto :goto_0
.end method

.method private static lastIndexOf(Lorg/jboss/netty/buffer/ChannelBuffer;IILorg/jboss/netty/buffer/ChannelBufferIndexFinder;)I
    .locals 3
    .parameter "buffer"
    .parameter "fromIndex"
    .parameter "toIndex"
    .parameter "indexFinder"

    .prologue
    const/4 v1, -0x1

    .line 1107
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v2

    invoke-static {p1, v2}, Ljava/lang/Math;->min(II)I

    move-result p1

    .line 1108
    if-ltz p1, :cond_0

    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->capacity()I

    move-result v2

    if-nez v2, :cond_2

    :cond_0
    move v0, v1

    .line 1118
    :cond_1
    :goto_0
    return v0

    .line 1112
    :cond_2
    add-int/lit8 v0, p1, -0x1

    .local v0, i:I
    :goto_1
    if-lt v0, p2, :cond_3

    .line 1113
    invoke-interface {p3, p0, v0}, Lorg/jboss/netty/buffer/ChannelBufferIndexFinder;->find(Lorg/jboss/netty/buffer/ChannelBuffer;I)Z

    move-result v2

    if-nez v2, :cond_1

    .line 1112
    add-int/lit8 v0, v0, -0x1

    goto :goto_1

    :cond_3
    move v0, v1

    .line 1118
    goto :goto_0
.end method

.method public static swapInt(I)I
    .locals 3
    .parameter "value"

    .prologue
    .line 1049
    int-to-short v0, p0

    invoke-static {v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapShort(S)S

    move-result v0

    shl-int/lit8 v0, v0, 0x10

    ushr-int/lit8 v1, p0, 0x10

    int-to-short v1, v1

    invoke-static {v1}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapShort(S)S

    move-result v1

    const v2, 0xffff

    and-int/2addr v1, v2

    or-int/2addr v0, v1

    return v0
.end method

.method public static swapLong(J)J
    .locals 6
    .parameter "value"

    .prologue
    const/16 v2, 0x20

    .line 1057
    long-to-int v0, p0

    invoke-static {v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapInt(I)I

    move-result v0

    int-to-long v0, v0

    shl-long/2addr v0, v2

    ushr-long v2, p0, v2

    long-to-int v2, v2

    invoke-static {v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->swapInt(I)I

    move-result v2

    int-to-long v2, v2

    const-wide v4, 0xffffffffL

    and-long/2addr v2, v4

    or-long/2addr v0, v2

    return-wide v0
.end method

.method public static swapMedium(I)I
    .locals 2
    .parameter "value"

    .prologue
    .line 1042
    shl-int/lit8 v0, p0, 0x10

    const/high16 v1, 0xff

    and-int/2addr v0, v1

    const v1, 0xff00

    and-int/2addr v1, p0

    or-int/2addr v0, v1

    ushr-int/lit8 v1, p0, 0x10

    and-int/lit16 v1, v1, 0xff

    or-int/2addr v0, v1

    return v0
.end method

.method public static swapShort(S)S
    .locals 2
    .parameter "value"

    .prologue
    .line 1035
    shl-int/lit8 v0, p0, 0x8

    ushr-int/lit8 v1, p0, 0x8

    and-int/lit16 v1, v1, 0xff

    or-int/2addr v0, v1

    int-to-short v0, v0

    return v0
.end method

.method public static unmodifiableBuffer(Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "buffer"

    .prologue
    .line 832
    instance-of v0, p0, Lorg/jboss/netty/buffer/ReadOnlyChannelBuffer;

    if-eqz v0, :cond_0

    .line 833
    check-cast p0, Lorg/jboss/netty/buffer/ReadOnlyChannelBuffer;

    .end local p0
    invoke-virtual {p0}, Lorg/jboss/netty/buffer/ReadOnlyChannelBuffer;->unwrap()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object p0

    .line 835
    .restart local p0
    :cond_0
    new-instance v0, Lorg/jboss/netty/buffer/ReadOnlyChannelBuffer;

    invoke-direct {v0, p0}, Lorg/jboss/netty/buffer/ReadOnlyChannelBuffer;-><init>(Lorg/jboss/netty/buffer/ChannelBuffer;)V

    return-object v0
.end method

.method public static wrappedBuffer(Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 4
    .parameter "buffer"

    .prologue
    .line 307
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->hasRemaining()Z

    move-result v0

    if-nez v0, :cond_0

    .line 308
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 313
    :goto_0
    return-object v0

    .line 310
    :cond_0
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->hasArray()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 311
    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v0

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->array()[B

    move-result-object v1

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->arrayOffset()I

    move-result v2

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->position()I

    move-result v3

    add-int/2addr v2, v3

    invoke-virtual {p0}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v3

    invoke-static {v0, v1, v2, v3}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[BII)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    goto :goto_0

    .line 313
    :cond_1
    new-instance v0, Lorg/jboss/netty/buffer/ByteBufferBackedChannelBuffer;

    invoke-direct {v0, p0}, Lorg/jboss/netty/buffer/ByteBufferBackedChannelBuffer;-><init>(Ljava/nio/ByteBuffer;)V

    goto :goto_0
.end method

.method public static wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "array"

    .prologue
    .line 249
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    if-ne p0, v0, :cond_1

    .line 250
    array-length v0, p1

    if-nez v0, :cond_0

    .line 251
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    .line 258
    :goto_0
    return-object v0

    .line 253
    :cond_0
    new-instance v0, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;

    invoke-direct {v0, p1}, Lorg/jboss/netty/buffer/BigEndianHeapChannelBuffer;-><init>([B)V

    goto :goto_0

    .line 254
    :cond_1
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;

    if-ne p0, v0, :cond_3

    .line 255
    array-length v0, p1

    if-nez v0, :cond_2

    .line 256
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 258
    :cond_2
    new-instance v0, Lorg/jboss/netty/buffer/LittleEndianHeapChannelBuffer;

    invoke-direct {v0, p1}, Lorg/jboss/netty/buffer/LittleEndianHeapChannelBuffer;-><init>([B)V

    goto :goto_0

    .line 260
    :cond_3
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "endianness"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public static wrappedBuffer(Ljava/nio/ByteOrder;[BII)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 2
    .parameter "endianness"
    .parameter "array"
    .parameter "offset"
    .parameter "length"

    .prologue
    .line 279
    if-nez p0, :cond_0

    .line 280
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "endianness"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 282
    :cond_0
    if-nez p2, :cond_3

    .line 283
    array-length v0, p1

    if-ne p3, v0, :cond_1

    .line 284
    invoke-static {p0, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 296
    :goto_0
    return-object v0

    .line 286
    :cond_1
    if-nez p3, :cond_2

    .line 287
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 289
    :cond_2
    new-instance v0, Lorg/jboss/netty/buffer/TruncatedChannelBuffer;

    invoke-static {p0, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    invoke-direct {v0, v1, p3}, Lorg/jboss/netty/buffer/TruncatedChannelBuffer;-><init>(Lorg/jboss/netty/buffer/ChannelBuffer;I)V

    goto :goto_0

    .line 293
    :cond_3
    if-nez p3, :cond_4

    .line 294
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0

    .line 296
    :cond_4
    new-instance v0, Lorg/jboss/netty/buffer/SlicedChannelBuffer;

    invoke-static {p0, p1}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v1

    invoke-direct {v0, v1, p2, p3}, Lorg/jboss/netty/buffer/SlicedChannelBuffer;-><init>(Lorg/jboss/netty/buffer/ChannelBuffer;II)V

    goto :goto_0
.end method

.method public static varargs wrappedBuffer(Ljava/nio/ByteOrder;[[B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 7
    .parameter "endianness"
    .parameter "arrays"

    .prologue
    const/4 v6, 0x0

    .line 347
    array-length v5, p1

    packed-switch v5, :pswitch_data_0

    .line 357
    new-instance v2, Ljava/util/ArrayList;

    array-length v5, p1

    invoke-direct {v2, v5}, Ljava/util/ArrayList;-><init>(I)V

    .line 358
    .local v2, components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    move-object v1, p1

    .local v1, arr$:[[B
    array-length v4, v1

    .local v4, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_0
    if-ge v3, v4, :cond_0

    aget-object v0, v1, v3

    .line 359
    .local v0, a:[B
    if-nez v0, :cond_1

    .line 366
    .end local v0           #a:[B
    :cond_0
    invoke-static {p0, v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->compositeBuffer(Ljava/nio/ByteOrder;Ljava/util/List;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v5

    .line 369
    .end local v1           #arr$:[[B
    .end local v2           #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .end local v3           #i$:I
    .end local v4           #len$:I
    :goto_1
    return-object v5

    .line 351
    :pswitch_0
    aget-object v5, p1, v6

    array-length v5, v5

    if-eqz v5, :cond_3

    .line 352
    aget-object v5, p1, v6

    invoke-static {p0, v5}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v5

    goto :goto_1

    .line 362
    .restart local v0       #a:[B
    .restart local v1       #arr$:[[B
    .restart local v2       #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .restart local v3       #i$:I
    .restart local v4       #len$:I
    :cond_1
    array-length v5, v0

    if-lez v5, :cond_2

    .line 363
    invoke-static {p0, v0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v5

    invoke-interface {v2, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 358
    :cond_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 369
    .end local v0           #a:[B
    .end local v1           #arr$:[[B
    .end local v2           #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .end local v3           #i$:I
    .end local v4           #len$:I
    :cond_3
    :pswitch_1
    sget-object v5, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_1

    .line 347
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public static wrappedBuffer(Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "buffer"

    .prologue
    .line 323
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->readable()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 324
    invoke-interface {p0}, Lorg/jboss/netty/buffer/ChannelBuffer;->slice()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    .line 326
    :goto_0
    return-object v0

    :cond_0
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_0
.end method

.method public static wrappedBuffer([B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "array"

    .prologue
    .line 240
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static wrappedBuffer([BII)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "array"
    .parameter "offset"
    .parameter "length"

    .prologue
    .line 270
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0, p1, p2}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[BII)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method

.method public static varargs wrappedBuffer([Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 8
    .parameter "buffers"

    .prologue
    const/4 v7, 0x0

    .line 444
    array-length v6, p0

    packed-switch v6, :pswitch_data_0

    .line 453
    const/4 v5, 0x0

    .line 454
    .local v5, order:Ljava/nio/ByteOrder;
    new-instance v2, Ljava/util/ArrayList;

    array-length v6, p0

    invoke-direct {v2, v6}, Ljava/util/ArrayList;-><init>(I)V

    .line 455
    .local v2, components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    move-object v0, p0

    .local v0, arr$:[Ljava/nio/ByteBuffer;
    array-length v4, v0

    .local v4, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_0
    if-ge v3, v4, :cond_0

    aget-object v1, v0, v3

    .line 456
    .local v1, b:Ljava/nio/ByteBuffer;
    if-nez v1, :cond_1

    .line 471
    .end local v1           #b:Ljava/nio/ByteBuffer;
    :cond_0
    invoke-static {v5, v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->compositeBuffer(Ljava/nio/ByteOrder;Ljava/util/List;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    .line 474
    .end local v0           #arr$:[Ljava/nio/ByteBuffer;
    .end local v2           #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .end local v3           #i$:I
    .end local v4           #len$:I
    .end local v5           #order:Ljava/nio/ByteOrder;
    :goto_1
    return-object v6

    .line 448
    :pswitch_0
    aget-object v6, p0, v7

    invoke-virtual {v6}, Ljava/nio/ByteBuffer;->hasRemaining()Z

    move-result v6

    if-eqz v6, :cond_5

    .line 449
    aget-object v6, p0, v7

    invoke-static {v6}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    goto :goto_1

    .line 459
    .restart local v0       #arr$:[Ljava/nio/ByteBuffer;
    .restart local v1       #b:Ljava/nio/ByteBuffer;
    .restart local v2       #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .restart local v3       #i$:I
    .restart local v4       #len$:I
    .restart local v5       #order:Ljava/nio/ByteOrder;
    :cond_1
    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->hasRemaining()Z

    move-result v6

    if-eqz v6, :cond_4

    .line 460
    if-eqz v5, :cond_2

    .line 461
    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_3

    .line 462
    new-instance v6, Ljava/lang/IllegalArgumentException;

    const-string v7, "inconsistent byte order"

    invoke-direct {v6, v7}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v6

    .line 466
    :cond_2
    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v5

    .line 468
    :cond_3
    invoke-static {v1}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    invoke-interface {v2, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 455
    :cond_4
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 474
    .end local v0           #arr$:[Ljava/nio/ByteBuffer;
    .end local v1           #b:Ljava/nio/ByteBuffer;
    .end local v2           #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .end local v3           #i$:I
    .end local v4           #len$:I
    .end local v5           #order:Ljava/nio/ByteOrder;
    :cond_5
    :pswitch_1
    sget-object v6, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_1

    .line 444
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public static varargs wrappedBuffer([Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 9
    .parameter "buffers"

    .prologue
    const/4 v7, 0x0

    .line 394
    array-length v6, p0

    packed-switch v6, :pswitch_data_0

    .line 403
    const/4 v5, 0x0

    .line 404
    .local v5, order:Ljava/nio/ByteOrder;
    new-instance v2, Ljava/util/ArrayList;

    array-length v6, p0

    invoke-direct {v2, v6}, Ljava/util/ArrayList;-><init>(I)V

    .line 405
    .local v2, components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    move-object v0, p0

    .local v0, arr$:[Lorg/jboss/netty/buffer/ChannelBuffer;
    array-length v4, v0

    .local v4, len$:I
    const/4 v3, 0x0

    .local v3, i$:I
    :goto_0
    if-ge v3, v4, :cond_0

    aget-object v1, v0, v3

    .line 406
    .local v1, c:Lorg/jboss/netty/buffer/ChannelBuffer;
    if-nez v1, :cond_1

    .line 429
    .end local v1           #c:Lorg/jboss/netty/buffer/ChannelBuffer;
    :cond_0
    invoke-static {v5, v2}, Lorg/jboss/netty/buffer/ChannelBuffers;->compositeBuffer(Ljava/nio/ByteOrder;Ljava/util/List;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    .line 431
    .end local v0           #arr$:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .end local v2           #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .end local v3           #i$:I
    .end local v4           #len$:I
    .end local v5           #order:Ljava/nio/ByteOrder;
    :goto_1
    return-object v6

    .line 398
    :pswitch_0
    aget-object v6, p0, v7

    invoke-interface {v6}, Lorg/jboss/netty/buffer/ChannelBuffer;->readable()Z

    move-result v6

    if-eqz v6, :cond_6

    .line 399
    aget-object v6, p0, v7

    invoke-static {v6}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Lorg/jboss/netty/buffer/ChannelBuffer;)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    goto :goto_1

    .line 409
    .restart local v0       #arr$:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .restart local v1       #c:Lorg/jboss/netty/buffer/ChannelBuffer;
    .restart local v2       #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .restart local v3       #i$:I
    .restart local v4       #len$:I
    .restart local v5       #order:Ljava/nio/ByteOrder;
    :cond_1
    invoke-interface {v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readable()Z

    move-result v6

    if-eqz v6, :cond_4

    .line 410
    if-eqz v5, :cond_2

    .line 411
    invoke-interface {v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_3

    .line 412
    new-instance v6, Ljava/lang/IllegalArgumentException;

    const-string v7, "inconsistent byte order"

    invoke-direct {v6, v7}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v6

    .line 416
    :cond_2
    invoke-interface {v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->order()Ljava/nio/ByteOrder;

    move-result-object v5

    .line 418
    :cond_3
    instance-of v6, v1, Lorg/jboss/netty/buffer/CompositeChannelBuffer;

    if-eqz v6, :cond_5

    move-object v6, v1

    .line 420
    check-cast v6, Lorg/jboss/netty/buffer/CompositeChannelBuffer;

    invoke-interface {v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readerIndex()I

    move-result v7

    invoke-interface {v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->readableBytes()I

    move-result v8

    invoke-virtual {v6, v7, v8}, Lorg/jboss/netty/buffer/CompositeChannelBuffer;->decompose(II)Ljava/util/List;

    move-result-object v6

    invoke-interface {v2, v6}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 405
    :cond_4
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 425
    :cond_5
    invoke-interface {v1}, Lorg/jboss/netty/buffer/ChannelBuffer;->slice()Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v6

    invoke-interface {v2, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 431
    .end local v0           #arr$:[Lorg/jboss/netty/buffer/ChannelBuffer;
    .end local v1           #c:Lorg/jboss/netty/buffer/ChannelBuffer;
    .end local v2           #components:Ljava/util/List;,"Ljava/util/List<Lorg/jboss/netty/buffer/ChannelBuffer;>;"
    .end local v3           #i$:I
    .end local v4           #len$:I
    .end local v5           #order:Ljava/nio/ByteOrder;
    :cond_6
    :pswitch_1
    sget-object v6, Lorg/jboss/netty/buffer/ChannelBuffers;->EMPTY_BUFFER:Lorg/jboss/netty/buffer/ChannelBuffer;

    goto :goto_1

    .line 394
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public static varargs wrappedBuffer([[B)Lorg/jboss/netty/buffer/ChannelBuffer;
    .locals 1
    .parameter "arrays"

    .prologue
    .line 336
    sget-object v0, Lorg/jboss/netty/buffer/ChannelBuffers;->BIG_ENDIAN:Ljava/nio/ByteOrder;

    invoke-static {v0, p0}, Lorg/jboss/netty/buffer/ChannelBuffers;->wrappedBuffer(Ljava/nio/ByteOrder;[[B)Lorg/jboss/netty/buffer/ChannelBuffer;

    move-result-object v0

    return-object v0
.end method
